<?php
 
class Topcmmchat_Component_Block_Dashboard extends Phpfox_Component
{	
	public function process()
	{
 		$oServiceFlashchat = Phpfox::getService('topcmmchat');
        $aSettings = $oServiceFlashchat->getSettings();
        $swfurl = $oServiceFlashchat->getClientUrl();
		$status = $oServiceFlashchat->getStatus();
		$rooms = $oServiceFlashchat->getRooms();
		$users = $oServiceFlashchat->getUsers();
		if ($users != null)
		{
			$users = array_chunk($users, 4, true);
		}
		$this->template()->assign(array(
        		'status' => $status,
        		'rooms'  => $rooms,
        		'users'  => $users,
        		'swfurl' => $swfurl,
        		'aSettings' => $aSettings
			)
        );
	}
}
 
?>